package org.ran.demo.http.stream;

import java.nio.charset.StandardCharsets;

public class StringAndByte {
    public static void main(String[] args) {
        String test= "fdshfkhdskjfds";
        System.out.println("test字符串长度为："+test.length());
        byte[] bytes = test.getBytes(StandardCharsets.ISO_8859_1);
        System.out.println("对应的ISO_8859_1编码byte数组长度为："+bytes.length);
        System.out.println("还原后的字符串为："+new String(bytes, StandardCharsets.ISO_8859_1));
    }
}
